﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SilverlightMultiFileUploadTestPage.aspx.cs" Inherits="FileUpload_5.Web.SilverlightMultiFileUploadTestPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<script src="Silverlight.js" type="text/javascript"></script>
	<title>上传测试页</title>
	<script src="JS/jquery-1.8.0.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function () {
			embedSilverlight(silverlightControlHost, "objSLFileUpload", "ucxt");
		});

		function objSLFileUpload_Resize(args) {
			$("#objSLFileUpload").height(args);
		}

		function embedSilverlight(parentElement, pluginId, userContext) {
			var altHtml = "<!--没安装-->";
			return Silverlight.createObject("ClientBin/FileUpload_5.xap",
                parentElement, pluginId,
                {
                	width: "470", height: "30",
                	background: "white", alt: altHtml,
                	version: "5.1.10411.0", autoUpgrade: "true"
                },
                { onError: onSLError, onLoad: onSLLoad },
                "MaxUploads=5,FileFilter=,CustomParam=yourparameters,DefaultColor=White,UploadHandlerURL=<%=UploadHandlerURL %>", userContext);
		}

		function onSLLoad(plugIn, userContext, sender) {
		}

		function onSLError(sender, args) {
			// Display error message.
		}

	</script>
</head>
<body>
	<form id="form1" runat="server">
	<div id="silverlightControlHost" style="border-bottom: 1px solid #ccc;">
	</div>
	<iframe id="_sl_historyFrame" style='visibility: hidden; height: 0; width: 0; border: 0px'></iframe>
	</form>
</body>
</html>
